using System.ComponentModel;

namespace MvvmCodeReduction.Model
{
    public class Customer : INotifyPropertyChanged
    {
        private string _name;
        public string Name
        {
            get { return _name; }
            set 
            { 
                _name = value;
                PropertyChanged(this, new PropertyChangedEventArgs("Name"));
            }
        }
        private int _id;
        public int ID
        {
            get { return _id; }
            set
            {
                _id = value;
                PropertyChanged(this, new PropertyChangedEventArgs("ID"));
            }
        }

        public Customer(int id, string name)
        {
            ID = id;
            Name = name;
        }

        public event PropertyChangedEventHandler PropertyChanged = delegate { };
    }
}